package com.ld.rightsSystem.vo;

import com.ld.rightsSystem.pojo.TPermission;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;
import java.util.List;

public class TPermissionTree extends TPermission{
    private List<TPermission> children;

    public TPermissionTree(TPermission tPermission) {
        super(tPermission.getCreateBy(),tPermission.getCreateTime(),tPermission.getUpdateBy(),tPermission.getUpdateTime(),
                tPermission.getRemark(),tPermission.getStatus(),tPermission.getDelStatus(),tPermission.getPermissionId(),
                tPermission.getPermissionName(),tPermission.getParentId(),tPermission.getPermissionOrder(),
                tPermission.getComponent(),tPermission.getPermissionCode(),tPermission.getPermissionIcon());
    }

    public TPermissionTree(String createBy, Date createTime, String updateBy, Date updateTime, String remark, int status, int delStatus, Long permissionId, String permissionName, Long parentId, Integer permissionOrder, String component, String permissionCode, String permissionIcon, List<TPermission> children) {
        super(createBy, createTime, updateBy, updateTime, remark, status, delStatus, permissionId, permissionName, parentId, permissionOrder, component, permissionCode, permissionIcon);
        this.children = children;
    }

    public List<TPermission> getChildren() {
        return children;
    }

    public void setChildren(List<TPermission> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "TPermissionTree{" +
                "children=" + children +
                '}';
    }
}
